const fs = require('fs-extra')
const path = require('path')

function getConfigurationByFile (files) {
  const pathToConfigFile = path.resolve('...', 'logging-in__html-web-forms/cypress/config', `cypress.${file}.json`)

  console.log(pathToConfigFile)

  return fs.readJson(pathToConfigFile)
}

module.exports = (on, config) => {
  // 指定一个环境变量，不指定，则使用cypress。dev.json
  return getConfigurationByFile(file)
}
